/**
 * 
 */
package com.gopay.common.constants.bank;

/**
 * @PsbcBankStatus.java
 * @author Ryan
 * @2013-12-4 上午10:06:18 www.gopay.com.cn Inc.All rights reserved.
 */
public enum NjcbBankStatus {

	/**** 处理中 ****/
	ORDER_TRANS_RESULT_PROCESSING("1","处理中"),
	/**** 已提交处理 ****/
	ORDER_TRANS_RESULT_SUBMIT("2","已提交处理"),
	/**** 处理失败 ****/
	ORDER_TRANS_RESULT_FAIL("3","处理失败"),
	/**** 处理成功 ****/
	ORDER_TRANS_RESULT_SUCC ("4","处理成功"),
	
	/** 没有符合条件的记录 */
	QUERY_ORDER_TRANS_NOT_FOUND("API0800","没有符合条件的记录"),
	/** 返回码0：成功. */
	QUERY_ORDER_TRANS_SUCCESS("0","交易处理成功"),
	/** 返回码1：失败. */
	QUERY_ORDER_TRANS_FAILURE("1","交易处理失败");
   
    private String key;
    public String value;

    NjcbBankStatus(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (NjcbBankStatus info : NjcbBankStatus.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key
     *            the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @param value
     *            the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }

}
